﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//
using System.Data.Entity.ModelConfiguration;
using ddcCajamarca.BusinessEntities.Administracion;
using System.ComponentModel.DataAnnotations.Schema;


namespace ddcCajamarca.Repository.Mapping
{
    public class ImagenMap:EntityTypeConfiguration<Imagen>
    {
        public ImagenMap()
        {
            //id
            this.HasKey(i => i.Id);
            this.Property(i => i.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            //propiedades
            this.Property(i => i.Descripcion)
                .HasColumnType("varchar")
                .HasMaxLength(80)
                .IsRequired();

            this.Property(i => i.Img).IsRequired();

        }
    }
}
